<script setup lang="ts">
import { useVModel } from '@vueuse/core';
import OptimizationPlanOperateView from '@/components/OptimizationPlanOperate/index.vue';
import { OptimizationPlanOperateVO } from '@/api/performanceTarget/optimizationPlanOperate/types';
const props = defineProps<{
  modelValue?: string | number;
}>();
const emit = defineEmits(['update:modelValue']);
const data = useVModel(props, 'modelValue', emit);
const optimizationPlanOperateView = ref<InstanceType<typeof OptimizationPlanOperateView>>();

const open = () => {
  optimizationPlanOperateView.value.open();
};

const callBack = (operateVOList?: OptimizationPlanOperateVO[]) => {
  data.value = operateVOList[0].id;
};
</script>

<template>
  <OptimizationPlanOperateView ref="optimizationPlanOperateView" :multiple="false" @confirm-call-back="callBack"></OptimizationPlanOperateView>
</template>

<style scoped lang="scss"></style>
